package model
{
	
	import event.Evt;
	import manager.*;
	
	/**
	 * -- ExplorePx --
	 * @desc	proxy for manage exploring
	 * @author	Aqua (built on 2011-11-09)
	 */
	public class ExplorePx extends BasePx
	{
		//-----------------//
		//     Publics     //
		//-----------------//
		
		/**************************************************************************
		 * -- init --
		 * @desc		initialize proxy
		 *************************************************************************/
		public override function init():void
		{
			_stageXML = XML(ResourceMgr.instance.getRes("xml_stages")).stage;
			_stageChosen = -1;
		}
		
		/**************************************************************************
		 * -- (getter) chosenStage --
		 * @desc		get index of current chosen stage
		 * @return		index of stage
		 *************************************************************************/
		public function get chosenStage():int
		{
			return _stageChosen;
		}
		
		/**************************************************************************
		 * -- (getter) stageNum --
		 * @desc		get the amount of stages
		 * @return		amount
		 *************************************************************************/
		public function get stageNum():int
		{
			return _stageXML.length();
		}
		
		/**************************************************************************
		 * -- getStageXML --
		 * @desc		get xml of stage by index
		 * @param		(index) index of stage
		 * @return		xml of stage
		 *************************************************************************/
		public function getStageXML(index:int):XML
		{
			return _stageXML[index];
		}
		
		/**************************************************************************
		 * -- chooseStage --
		 * @desc		player choose a stage
		 * @param		(index) index of the stage
		 *************************************************************************/
		public function chooseStage(index:int):void
		{
			_stageChosen = index;
		}
		
		/**************************************************************************
		 * -- enterStage --
		 * @desc		player enters the stage
		 *************************************************************************/
		public function enterStage():void
		{
			
		}
		
		
		public static const NAME:String = "ExplorePx";
		
		private var _stageXML		:XMLList;
		private var _stageChosen	:int;
	}
	
}